package com.weixin.paleituo.bean;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.ArrayList;
import java.util.List;

/**
 * Author yichao
 * Time  2018/4/1 14:18
 * Dest
 */

public class ChildrenBeanXX implements Parcelable{

    /**
     * children : [{"children":[{"id":899,"img":"http://p35r91t1w.bkt.clouddn.com/upload/goods_list_img/37c82002-bea2-4f0d-a6f5-24531b91733e.jpg","name":"北欧风格 抛光实木内架棉麻布艺左转角沙发（3+左贵妃）","price":5000},{"id":875,"img":"http://p35r91t1w.bkt.clouddn.com/upload/goods_list_img/c0bf5ba6-f0e7-4164-9a15-ac8329f7a4f4.jpg","name":"古欧 美式圆餐桌简美餐台简约欧式风格餐厅家具奢华实木餐桌GU120","price":20000}],"name":"全部"}]
     * name : 推荐商品
     * id : 738
     */

    private String name;
    private int id;
    private List<ChildrenBeanX> children;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public List<ChildrenBeanX> getChildren() {
        return children;
    }

    public void setChildren(List<ChildrenBeanX> children) {
        this.children = children;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.name);
        dest.writeInt(this.id);
        dest.writeList(this.children);
    }

    public ChildrenBeanXX() {
    }

    protected ChildrenBeanXX(Parcel in) {
        this.name = in.readString();
        this.id = in.readInt();
        this.children = new ArrayList<ChildrenBeanX>();
        in.readList(this.children, ChildrenBeanX.class.getClassLoader());
    }

    public static final Creator<ChildrenBeanXX> CREATOR = new Creator<ChildrenBeanXX>() {
        @Override
        public ChildrenBeanXX createFromParcel(Parcel source) {
            return new ChildrenBeanXX(source);
        }

        @Override
        public ChildrenBeanXX[] newArray(int size) {
            return new ChildrenBeanXX[size];
        }
    };
}
